<?php

namespace app\common\validate;

use think\Validate;

class Canal extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'username' => 'require|regex:\w{3,30}|unique:admin',
        'password' => 'regex:\S{32}',
        'mobile'   => 'regex:1[3-9]\d{9}|unique:admin,mobile',
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['username','password'],
        'edit' => ['username', 'password', 'mobile'],
    ];
    
}
